#!/bin/bash

model=$(adb shell "ls /data/local/tmp/pa/data | grep Qwen2-0.5B")
if [ -z "$model" ]; then
    adb push model/Qwen2-0.5B /data/local/tmp/pa/data
fi

adb shell "rm -rf /data/local/tmp/pa/bin/*"
adb push build_android/pa /data/local/tmp
adb push scripts/android_local_run.sh /data/local/tmp/pa
adb shell "cd /data/local/tmp/pa && sh android_local_run.sh"